<script setup>
import {ref} from 'vue'
import fanxiao from "./fanxiao-page.vue"

let time = ref(0);

const timeStop = setInterval(() => {
  time.value = time.value + 1;
  console.log(time.value);
  if(time.value == 5){
    clearInterval(timeStop)
  }
},1000)
</script>

<template>
  <view v-if="time <= 5 && time >= 0">
    <fanxiao></fanxiao>
  </view>
</template>

<style scoped>
#background{
  display: flex;
  justify-content: center;
}
</style>